class Person {
  constructor(name, age) {
    this.name = name
    this.age = age
  }
  study() {
    console.log(this.name + " studying~")
  }
  running() {
    console.log(this.name + " running~")
  }
  personMethod() {
    console.log(1)
    console.log(2)
    console.log(3)
  }
}
// 继承
class Student extends Person {
  constructor(name, age, sno) {
    super(name, age)
    this.sno = sno
  }
  personMethod() {
    super.personMethod()
    console.log(4)
    console.log(5)
    console.log(6)
  }
}
var stu = new Student('yz', 20, 1001)
console.log(stu)
stu.study()
stu.personMethod()
